package com.cy.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RefreshScope
@RestController
@RequestMapping("/pro")
public class ProviderControllerTwo {
    @Value("${server.port:8080}")
    private String server;
    @Value("${server.tomcat.threads.max:200}")
    private String group;
    @Value("${page.pageSize:10}")
    private String page;
    @GetMapping("/echo/{msg}")
    public String doRestEcho1(@PathVariable String msg){
        return server+"你好"+msg;
    }
    @GetMapping("/max")
    public String doRestEcho2(){
        return server+"你好"+group;
    }
    @GetMapping("/page")
    public String doRestEcho3(){
        return server+"你好"+group+"；分页："+page;
    }
}
